<!doctype html>
<html>
<head>
    <meta charset="UTF-8" />
    <title>集赞</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" />
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/Wx/css/base.css" />
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/Wx/css/cart.css" />
    <style type="text/css">
        .attention{ position:fixed; width:100%; max-width:640px; height:50px; top:0px; background:rgba(0,0,0,0.5); overflow:hidden; zoom:1; z-index:101;}
        .attention .logo{ position:absolute; left:15px;}
        .attention .logo>img{ display:block; width:40px; height:40px; float:left; margin-top:5px;}
        .attention .logo h3{ margin-left:50px; height:50px; line-height:50px; font-weight:normal; font-size:15px; color:#fff;}
        .attention .logo p{ margin-left:30px;margin-top:4px; font-size:13px; color:#7c7c7c;}
        .attention i{ display:block; width:80px; height:30px; position:absolute; top:10px; right:15px;}
        .attention i input{ display:block; border:none; width:80px; height:30px; border-radius:2px; background:#00bd12; color:#fff; font-size:13px; appearance:none; -webkit-appearance:none;border-radius:0;}
    </style>
</head>
<body>
<div class="detail" style="padding-bottom:60px;">
    <if condition="$focus eq 0">
        <div class="attention">
            <div class="logo">
                <img src="__PUBLIC__/Wx/img/logo02.png"/>
                <h3>乡土味士</h3>
            </div>
            <i><input type="button" value="立即关注" class="gz"/></i>
        </div>
    </if>
    <div class="success-sc">
        <div class="inner">
            <div class="toptit">
                <h2><img src="__PUBLIC__/Wx/img/logo03.png"/></h2>
                <p>社区对接偏远山村，既能吃好的，又能帮助他们</p>
            </div>
            <div class="prointro">
                <div class="name">
                    <div class="pic"><img src="{$member.avatar}"/></div>
                    <h2>{$member.nickname}</h2>
                    <!--<span>助人为乐</span>-->
                </div>
                <div class="product">
                    <!--<p>我要当社区扶贫大使，请帮我集赞！</p>-->
                    <div class="int" onclick="window.location.href='__MODULE__/Foretaste/pro/gid/{$id}'">
                        <div class="pic"><img src="{$h_imgs}"/></div>
                        <div class="proname-sc">
                            <h3>{$title}</h3>
                            <h4>{$order.u_num}<?=getunit($unit)?>精品装</h4>
                            <del>￥{$market}</del>
                            <p><b>{$order.price}积分即可试吃</b><span>{$sumorder}人已免费试吃</span></p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="mess02">
            <!--<p>我正在参加偏远山村<b>0元试吃</b>活动，帮我集赞<br/>就有机会当选社区扶贫大使</p>
            <p><b>免费去恩施农村体验3天</b>，给大家带好吃的回来<br/>快来帮我集赞！</p>-->
            <p style="text-align: center">我正在参加偏远山村<b>0元试吃</b>活动，帮我集赞给大家带好吃的回来，快来帮我集赞！</p>
        </div>
        <a name="praise_list" href="#"></a>
        <if condition="$order['population'] gt 0">
            <div class="list-dz">

                <h3>集赞榜</h3>
                <ul>
                    <volist name="log" id="vo">
                        <li>
                            <div class="pic"><img src="{$vo.avatar}"/></div>
                            <h4>{$vo.nickname}<time><?=date("Y-m-d H:i",$vo['addtime'])?></time></h4>
                        </li>
                    </volist>
                    <!--<li>-->
                    <!--<div class="pic"><img src="__PUBLIC__/Wx/images/store02.jpg"/></div>-->
                    <!--<h4>乐活乐活<time>2018-04-08 08:27</time></h4>-->
                    <!--</li>-->
                </ul>
            </div>
        </if>
    </div>
    <if condition="$order['state'] eq 0">
        <if condition="$member['is_me'] eq 'true'">
            <div class="button02 fenx"><input type="button" value="邀请好友帮忙集赞"/></div>
            <elseif condition="$member['is_praise'] eq 'true'" />
            <!--<p><input type="button" value="我也要参加" onclick="window.location.href='__MODULE__/Foretaste/pro/gid/{$id}'"/></p>-->
            <div class="button02 fenx"><input type="button" value="分享给其他好友帮他集赞"/></div>
            <else />
            <div class="button02"><input type="button" value="帮他点赞" onclick="praise()"/></div>
        </if>
    </if>
    <div class="page02">
        <div class="guide">
            <div class="pic"><img src="__PUBLIC__/Wx/img/share.png"/></div>
            <p>点击右上角，分享给朋友</p>
            <h5>邀请朋友来帮忙点赞！！！</h5>
            <h6><input type="button" value="我知道了" class="know"/></h6>
        </div>
    </div>
    <!--<div class="hint">-->
        <!--<div class="shadow">-->
            <!--<div class="close"></div>-->
            <!--<div class="succeed">-->
                <!--<h2>温馨提示</h2>-->
                <!--<p style="text-align:center; color:#333;">点赞成功</p>-->
                <!--<h3 style="text-align:center;">感谢对好友支持，关注公众号参与免费吃活动</h3>-->
                <!--<p style="padding:0; height:40px; position:absolute; width:100%; bottom:0;"><input type="button" value="返回社区" onclick="window.location.href='__MODULE__/Index/index'" class="right"/><input type="button" value="取消" class="left"/></p>-->
            <!--</div>-->
        <!--</div>-->
    <!--</div>-->
    <div class="hint">
        <div class="shadow">
            <div class="close"></div>
            <div class="succeed">
                <h2>温馨提示</h2>
                <p style="text-align: center">社区对接偏远山村，吃好的又能帮他们</p>
                <!--<p>我也要当社区扶贫大使，免费去恩施体验3天</p>
                <p style="padding:0; height:40px; position:absolute; width:100%; bottom:0;"><input type="button" value="我也要免费去旅游" class="right foretaste_focus" /><input type="button" value="继续分享好友帮他集赞" class="left"/></p>-->
                <p style="padding:0; height:40px; position:absolute; width:100%; bottom:0;"><input type="button" value="我也要参加活动" class="right foretaste_focus" /><input type="button" value="继续分享好友帮他集赞" class="left"/></p>
            </div>
        </div>
    </div>
    <div class="page">
        <div class="close"></div>
        <div class="inner">
            <div class="pic"><img src="__PUBLIC__/Wx/images/pic14.jpg"/><p>长按图片【识别二维码】关注公众号</p></div>
            <div class="step">
                <h2>无法识别二维码</h2>
                <p>1.打开微信，点击“添加朋友”</p>
                <p>2.点击“公众号”</p>
                <p>3.搜索公众号：“乡土味士”</p>
                <p>4.点击：关注“，完成</p>
                <h5>精准扶贫 从我做起</h5>
            </div>
        </div>
    </div>

    <!--引用悬浮公共导航文件-->
    <include file="Public:nav" />
</div>
<script type="text/javascript" src="__PUBLIC__/Wx/js/jquery.js" ></script>

<script type="text/javascript">
    $('.fenx').click(function(){
        $('.page02').css('display','block')
    });
    $('.know').click(function(){
        $('.page02').css('display','none')
    });
    // $('.right').click(function(){
    //     $('.hint').css('display','none')
    //     $('.page').css('display','block')
    // });
    $('.foretaste_focus').click(function(){
        if ("{$focus}" == 0){
            $('.page').css('display','block')
        }else{
            window.location.href="__MODULE__/Foretaste/index"
        }
    });
    $('.page .close').click(function(){
        $('.page').css('display','none')
    });
    $('.hint .close').click(function(){
        $('.hint').css('display','none')
    });
    $('.left').click(function(){
        $('.hint').css('display','none')
        window.location.reload();
    });
    $('.gz').click(function(){
        $('.page').css('display','block')
    });
    $('.close').click(function(){
        $('.page').css('display','none')
    });
    // $('.button input').click(function(){
    //     $('.page02').css('display','block')
    // });

    $(".click span").click(function(){
        if($(this).text() ==="导航"){
            $(this).text("收起");
            $('.link02').css('display','block')
        }else{
            $(this).text("导航");
            $('.link02').css('display','none')
        }
    });//end fun
</script>
<script type="text/javascript">
    function praise() {
        // if("{$focus}" == 0){
        //     $('.page').css('display','block')
        // }else{
            $.post("",{'op':'praise'},function (d) {
                if (d.state >0){
                    alert(d.val);
                }else{
                    $('.hint').css('display','block')
                    // window.location.reload();
                }
            })
        // }

    }


    $(document).ready(function () {
        window.setInterval(function(){
            // window.location.reload();
            window.location.href="__MODULE__/Foretaste/foretaster/oid/{$order['id']}"+"#praise_list";

        },3000);
    });

</script>
<include file="Public/share" title="{$title}" desc="来乡土味士，吃天然菜，评选扶贫大使！" imgurl="{$h_imgs}" />
</body>
</html>